#include <cstdio>

int n;
double p[ 16 ][ 16 ], v[ 16 ], w[ 16 ], f[ 1 << 15 ];

void init( )
{
    int i, j, m, b, c;
    double t;
    for ( i = 0; i < n; i++ )
        for ( j = 0; j < n; j++ )
            p[ i ][ j ] = 1;
    for ( i = 0; i < n; i++ )
    {
        scanf("%lf%lf%d", &v[ i ], &w[ i ], &m);
        while ( m-- )
        {
            scanf("%d%d", &b, &c);
            p[ i ][ b - 1 ] = 1 - c / 100.0;
        }
    }
}

void work( )
{
    int i, j, k;
    double s, ss, minn = 1000000;
    f[ 0 ] = 0;
    for ( i = 1; i < 1 << n; i++ )
    {
        f[ i ] = 10000000;
        ss = 0;
        for ( j = 0; j < n; j++ )
            if ( ( 1 << j ) & i )
            {
                ss += w[ j ];
                s = 1;
                for ( k = 0; k < n; k++ )
                    if ( ( 1 << k ) & ( i ^ ( 1 << j ) ) )
                        s *= p[ k ][ j ];
                if ( f[ i ] > f[ i ^ ( 1 << j ) ] + s * v[ j ] )
                    f[ i ] = f[ i ^ ( 1 << j ) ] + s * v[ j ];
            }
        if ( minn > f[ i ] / ss )
            minn = f[ i ] / ss;
    }
    printf("%.4lf\n", minn);
}

int main( )
{
    while ( scanf("%d", &n) && n )
    {
        init( );
        work( );
    }
    return 0;
}
